import React, { useEffect } from "react";
import { getUserInfo } from "src/api";
const prefix = "db_man";
const Header = () => {
  const [userInfo, setUserInfo] = React.useState({});
  const queryUserInfo = async () => {
    let data = await getUserInfo();
    setUserInfo(data);
    console.log(data, "数据");
  };
  useEffect(() => {
    queryUserInfo();
  }, []);
  console.log("之星了两次");
  return (
    <div className={`${prefix}-header`}>
      <div className={`${prefix}-header-left`}>管理系统</div>
      <div className={`${prefix}-header-right`}>用户</div>
    </div>
  );
};
export default Header;
